#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2023/1/19 15:34
# @Author : 闫峰
# @File    : jdw_api.jdw_api.channels.walmart.product.modifyItem.py
import json

from third_services.jdw.ept.api import get_result_bei


def jd_jdw_channels_walmart_product_modifyItem(ordersourceid):
    """商品编辑接口"""

    method = "jd.jdw_api.channels.walmart.product.modifyItem"
    param =   {
    "request": {
        "appUserPin": "ept_sOBhCOxacgHH",
        "fulfilmentLagTime": 4,
        "jsonData": "{\"MPItem\":[{\"Orderable\":{\"price\":10.29,\"productIdentifiers\":{\"productId\":\"7903400446320\",\"productIdType\":\"EAN\"},\"productName\":\"NUOLUX Gemstones Jewelry Bracelets Yoga Bracelet Hand Jewellery Mens Wrist Bracelets Elastic  Bride\"},\"Visible\":{\"Home Decor, Kitchen, & Other\":{\"mainImageUrl\":\"https://picture-cdn03.zhcxkj.com/65306/1/ProductImages/11208145/2021-06-24/9007991ef6f1443ca8417569436dc977/045bb1d0-a59f-4dc8-81fb-9f57c1b4ba5e.jpg\",\"productSecondaryImageURL\":[\"https://picture-cdn03.zhcxkj.com/30058/1/ProductImages/11208145/2021-06-24/9146514b7395426cb57dfcb209ca9e55/0e2a6904-4c71-443f-bf99-5bedb593f46b.jpg\",\"https://picture-cdn03.zhcxkj.com/91514/1/ProductImages/11208145/2021-06-24/65addd4e40414cffa83318774747867a/e532315f-1304-48dd-b648-3c336cd6e43e.jpg\",\"https://picture-cdn03.zhcxkj.com/19230/1/ProductImages/11208145/2021-06-24/82ca8c51f297447bb5efff39a6773ce5/2a7ce2b0-97d9-4939-935c-9c385b8955f7.jpg\",\"https://picture-cdn03.zhcxkj.com/20196/1/ProductImages/11208145/2021-06-24/dc8296214c614de39d497a7d27cd9c0a/d6dca4a4-2980-4110-9a6e-9c012402c7ec.jpg\",\"https://picture-cdn03.zhcxkj.com/34449/1/ProductImages/11208145/2021-06-24/617b5a1a87374abe9729ce6020e45eef/b774e2f1-ffe4-4e3d-8791-e113c5359797.jpg\"],\"shortDescription\":\"<strong>Description</strong><br />\\n<br />\\n<span>This item is an </span><span>exquisite </span><span> which is manufactured with premium material for and -lasting use. Delicate workmanship will make the wearer look more elegant and attractive. A wonderful wrist decor for party, banquet, daily decor, etc.</span><br />\\n<br />\\n<strong>Features</strong><br />\\n<br />\\n<span>-Color: </span><span>Assorted Color</span><br />\\n<span>-Material: C</span><span>rystal Stone</span><br />\\n<span>-Size: About </span><span>20.00X1.60X0.80cm/7.86X0.63X0.31in<br />\\n<span>-Note: The color of the beads is random </span><br />\\n<span>- The is made of , which has the .</span><br />\\n<span>- Colorful stone design will immediately put the wearer in the spotlight in any occasion.</span><br />\\n<span>- Perfect gifts for the birthday or festival when you want to express your special feeling and love.</span><br />\\n<span>- A wonderful wrist decor for party, banquet, daily decor, etc.</span><br />\\n<span>- Features the simple , provides convenience to wear and take off.</span></span><br/><strong>Description</strong><br/>\\\\n<span>1 x Bracelet</span>\"}}}],\"MPItemFeedHeader\":{\"locale\":\"en\",\"processMode\":\"REPLACE\",\"sellingChannel\":\"marketplace\",\"subCategory\":\"home_other\",\"subset\":\"EXTERNAL\",\"version\":\"4.6\"}}",
        "mainImageUrl": "https://picture-cdn03.zhcxkj.com/65306/1/ProductImages/11208145/2021-06-24/9007991ef6f1443ca8417569436dc977/045bb1d0-a59f-4dc8-81fb-9f57c1b4ba5e.jpg",
        "modifyType": 1,
        "price": 10.29,
        "returnCenter": "JD-US-110",
        "sku": "1071581922"
    }
}
    param = json.dumps(param)
    print(get_result_bei(ordersourceid, method, param))


if __name__ == '__main__':
    jd_jdw_channels_walmart_product_modifyItem(20411)
